#include<iostream>
#include<algorithm>
using namespace std;
const int N = 1e3 + 10;
void Direction_Sort_1(int arr[], int n)
{
	for (int i = 1; i < n; i++)
	{
		if (arr[i] < arr[i - 1]) {
			swap(arr[i], arr[i - 1]);
		}
		for (int j = i - 1; j > 0 && arr[j] < arr[j - 1]; j--) {
			swap(arr[j], arr[j - 1]);
		}
	}
}
void Direction_Sort(int arr[], int n)
{
	for (int i = 2; i <= n; i++)
	{
		arr[0] = arr[i];
		int j = i - 1;
		while (arr[0] < arr[j]) {
			arr[j+1] = arr[j];
			j--;
		}
		arr[j+1] = arr[0];
	}
}
int main()
{
	int arr[N];
	int n;
	cin >> n;
	for (int i = 1; i < n+1; i++) {
		cin >> arr[i];
	}
	Direction_Sort(arr, n);
	for (int i = 1; i < n+1; i++) {
		cout << arr[i] << " ";
	}
	cout << endl;
	return 0;
}